package com.lingo.mgr.service.chatSession;

import com.alibaba.fastjson.JSONObject;
import com.lingo.common.core.page.TableDataInfo;
import com.lingo.mgr.domain.bo.ChatSessionBo;
import com.lingo.mgr.domain.bo.ChatSessionStartBo;
import com.lingo.mgr.domain.vo.ChatSessionMessageVo;
import com.lingo.mgr.domain.vo.ChatSessionStartVo;
import com.lingo.mgr.domain.vo.ChatSessionVo;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 聊天消息会话Service接口
 *
 * @author ruoyi
 * @date 2023-08-30
 */
public interface IChatSessionService {

    /**
     * 查询聊天消息会话
     */
    ChatSessionVo queryById(Long id);

    /**
     * 查询聊天消息会话列表
     */
    TableDataInfo<ChatSessionStartVo> queryPageList(ChatSessionBo bo);

    /**
     * 查询聊天消息会话列表
     */
    List<ChatSessionVo> queryList(ChatSessionBo bo);

    /**
     * 新增聊天消息会话
     */
    Boolean insertByBo(ChatSessionBo bo);

    /**
     * 修改聊天消息会话
     */
    Boolean updateByBo(ChatSessionBo bo);

    /**
     * 校验并批量删除聊天消息会话信息
     */
    Boolean deleteById(Long sessionId);

    ChatSessionStartVo start(ChatSessionStartBo bo,HttpServletRequest request);

    SseEmitter sse(Long sessionId, Long dataId);

    TableDataInfo<ChatSessionMessageVo> recordBySessionId(ChatSessionBo bo);

    ChatSessionStartVo reStart(ChatSessionStartBo bo, HttpServletRequest request);

    JSONObject getSearchPrompt();

    JSONObject getSimilarPrompt(Long sessionId);
}
